﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using FluentNHibernate.Automapping.Alterations;
using FluentNHibernate.Automapping;

namespace Domain.Model.Mapping.Overrides
{
    public class FormElementMappingOverride : IAutoMappingOverride<FormElement>
    {
        public void Override(AutoMapping<FormElement> mapping)
        {
            mapping.CompositeId()
                .KeyProperty(x => x.Name)
                .KeyReference(x => x.Form, "FormId");

            //mapping.References<Form>(x => x.Form)
            //    .Column("FormId");
        }
    }
}